#include <iostream>
using namespace std;
class Firendly
{
    int i;

public:
    Firendly(int theInt)
    {
        i = theInt;
    }
    friend void f(const Firendly &);
    void g() { f(*this); }
};
void h()
{
    f(Firendly(1));
}
void f(const Firendly &fo)
{
    cout << fo.i << endl;
}
int main(int argc, char *argv[])
{
    h();
    Firendly(2).g();
}